-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: AI Rules for React Spectrum #8319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Build successful! 🎉 |
When using server side rendering, the locale prop should be set explicitly on the Provider rather than relying on automatic locale selection. | ||
|
||
[Read more here](mdc:https:/react-spectrum.adobe.com/react-spectrum/getting-started.html) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the following when using cursor in quarry for the test utils:
## Test writing and test utils
When using server side rendering, the locale prop should be set explicitly on the Provider rather than relying on automatic locale selection.
When writing tests against apps using React Spectrum components, you should try to use the test utils from the `@react-spectrum/test-utils` package. If you are writing tests against apps using React Aria Components, you should try to use the test utils from `@react-aria/test-utils`.
If you are able to browse the web, docs for the test utils can be found at @https://react-spectrum.adobe.com/react-aria/testing.html#react-aria-test-utils- and
https://react-spectrum.adobe.com/react-spectrum/testing.html#react-spectrum-test-utils- respectively. Supported aria patterns can be found in the https://react-spectrum.adobe.com/react-spectrum/testing.html#patterns
and https://react-spectrum.adobe.com/react-aria/testing.html#patterns sections, with links pointing to documentation for
each individual pattern. Prioritize using these docs and looking at ".test." files as examples in https://github.com/adobe/react-spectrum for the specific "createTester" pattern when looking up the API usage.
### Patterns
- Combobox
- GridList
- ListBox
- Menu
- Select
- Table
- Tabs
- Tree
which seemed to work pretty decently. Happy to get this merged in as is, but if you have any feedback or would like to include this section as well lemme know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Feel free to create a PR, or we can give it some time to see if we have any other improvements, and batch them in later with any React Aria rules we add.
Rules that you can place in your project to help your coding agent (i.e. Cursor) perform better when using various React Spectrum libraries.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: